Optimal. Leaf size=66 \[ -\frac{(a B-b C) \log (\cos (c+d x))}{d}-x (a C+b B)+\frac{C (a+b \tan (c+d x))^2}{2 b d}+\frac{b B \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0458897, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3630, 3525, 3475} \[ -\frac{(a B-b C) \log (\cos (c+d x))}{d}-x (a C+b B)+\frac{C (a+b \tan (c+d x))^2}{2 b d}+\frac{b B \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3630
Rule 3525
Rule 3475
Rubi steps
\begin{align*} \int (a+b \tan (c+d x)) \left (B \tan (c+d x)+C \tan ^2(c+d x)\right ) \, dx &=\frac{C (a+b \tan (c+d x))^2}{2 b d}+\int (a+b \tan (c+d x)) (-C+B \tan (c+d x)) \, dx\\ &=-(b B+a C) x+\frac{b B \tan (c+d x)}{d}+\frac{C (a+b \tan (c+d x))^2}{2 b d}+(a B-b C) \int \tan (c+d x) \, dx\\ &=-(b B+a C) x-\frac{(a B-b C) \log (\cos (c+d x))}{d}+\frac{b B \tan (c+d x)}{d}+\frac{C (a+b \tan (c+d x))^2}{2 b d}\\ \end{align*}
Mathematica [A] time = 0.292894, size = 67, normalized size = 1.02 \[ \frac{-2 (a C+b B) \tan ^{-1}(\tan (c+d x))+2 (a C+b B) \tan (c+d x)+2 (b C-a B) \log (\cos (c+d x))+b C \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.013, size = 105, normalized size = 1.6 \begin{align*}{\frac{C \left ( \tan \left ( dx+c \right ) \right ) ^{2}b}{2\,d}}+{\frac{B\tan \left ( dx+c \right ) b}{d}}+{\frac{C\tan \left ( dx+c \right ) a}{d}}+{\frac{a\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) B}{2\,d}}-{\frac{\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) Cb}{2\,d}}-{\frac{B\arctan \left ( \tan \left ( dx+c \right ) \right ) b}{d}}-{\frac{C\arctan \left ( \tan \left ( dx+c \right ) \right ) a}{d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.76493, size = 89, normalized size = 1.35 \begin{align*} \frac{C b \tan \left (d x + c\right )^{2} - 2 \,{\left (C a + B b\right )}{\left (d x + c\right )} +{\left (B a - C b\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 2 \,{\left (C a + B b\right )} \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.43942, size = 161, normalized size = 2.44 \begin{align*} \frac{C b \tan \left (d x + c\right )^{2} - 2 \,{\left (C a + B b\right )} d x -{\left (B a - C b\right )} \log \left (\frac{1}{\tan \left (d x + c\right )^{2} + 1}\right ) + 2 \,{\left (C a + B b\right )} \tan \left (d x + c\right )}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.587673, size = 105, normalized size = 1.59 \begin{align*} \begin{cases} \frac{B a \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} - B b x + \frac{B b \tan{\left (c + d x \right )}}{d} - C a x + \frac{C a \tan{\left (c + d x \right )}}{d} - \frac{C b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac{C b \tan ^{2}{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \left (a + b \tan{\left (c \right )}\right ) \left (B \tan{\left (c \right )} + C \tan ^{2}{\left (c \right )}\right ) & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.92277, size = 832, normalized size = 12.61 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]